<?php
include_once '../Class/DB.php';
$db=new DB();
$name=$_GET["name"];
$parent=$_GET["parent"];
$db->AddType($name, $parent);
if($parent==0){
?>
<script language="JavaScript">
window.location.href="classifyList.php";
</script>
<?php 
}
else{
?>
<script language="JavaScript">
var ptid='<?php print_r($parent);?>';
window.location.href="s_classesList.php?id="+ptid;
</script>
<?php 
}
?>